package com.usian.search.controller.v1;

import com.usian.apis.search.ApArticleSearchControllerApi;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.search.dtos.UserSearchDto;
import com.usian.search.service.ApArticleSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/article/search")
public class ApArticleSearchController implements ApArticleSearchControllerApi {

    @Autowired
    private ApArticleSearchService apArticleSearchService;


    @Override
    @PostMapping("/search")
    public ResponseResult articleSearch(@RequestBody UserSearchDto dto) {

        return apArticleSearchService.search(dto);

    }
}
